module EasyForm
  module Inputs

    class StringInput < Base
      enable :maxlength, :placeholder, :minlength, :pattern, :min_max

      def input(wrapper_options = nil)
        merged_wrapper_options = merge_wrapper_options(input_html_options, wrapper_options)
        @builder.text_field attribute_name, merged_wrapper_options
      end

      private
      def string?
        input_type == :string || input_type == :citext
      end
    end
  end
end